package pro1.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import pro1.model.Department;

public interface DepartmentMapper {
	int deleteByPrimaryKey(Integer id);

	int insert(Department record);

	int insertSelective(Department record);

	Department selectByPrimaryKey(Integer id);

	int updateByPrimaryKeySelective(Department record);

	int updateByPrimaryKey(Department record);

	@Select("select id, name, info, charge, createtime from department order by createtime desc")
	List<Map<String, Object>> selectAll();

	@Select("select id, name, info, charge, createtime from department where name=#{name}")
	Department selectByName(@Param("name") String name);
}